#ifndef SCENE_H
#define SCENE_H

#include "game.h"
#include "object.h"
#include "drawer.h"
#include <memory>

class CDrawer;
class CObject;
class CCreep;
class CSpawner;
class CButton;

class CScene {
private:
    int time;
    CDrawer *gamedrawer;
    vector<std::unique_ptr<CObject> > objekty;
    vector<std::unique_ptr<CButton> > buttons;
    int escaped;
    int idcounter;

    int wave;
    int numwaves;
    int credits;
    bool gameover;
    CSpawner *gamespawner;

    map<string,int> registry;

public:
    CScene();
    ~CScene();

    void fillArray(int n);
    void doAll();
    void assignDrawer(CDrawer *what);
    int numCreeps();

    vector<std::unique_ptr<CObject> >* obj();
    vector<std::unique_ptr<CButton> >* btn();

    void resetTime();
    int getTimeDiff();
    int getEscaped();
    void Escape();
    int requestNewID();
    void delCreep(CCreep* what);

    int GetWave();
    int GetNumWaves();
    int GetCredits();
    void Credit(int what);
    bool gameOver();
    void setGameOver();
    void NextWave();
    void assignSpawner(CSpawner *what);

    void SetRegistryValue(string,int);
    int GetRegistryValue(string);

};

#endif // SCENE_H
